<!-- 预览docx，仅支持docx -->
<script setup lang="ts">
import VueOfficeDocx from '@vue-office/docx'
import '@vue-office/docx/lib/index.css'

const props = defineProps({
  /** 文件名 */
  fileName: String,
  /** 链接地址 */
  fileData: Blob,
  /** 渲染成功 */
  renderedHandler: Function,
  /** 渲染失败 */
  errorHandler: Function,
})
</script>
<template>
  <vue-office-docx
    :src="props.fileData"
    class="h-[100vh] w-full"
    @rendered="props.renderedHandler"
    @error="props.errorHandler"
  />
</template>

<style scoped></style>
